home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
501 Great Games
/
501 Great Games - Volume One (2001)(Guildhall Leisure Services).iso
/
LINK FOUR
/
SAMPLE.RUL
< prev
next >
Wrap
Text File
|
1993-10-17
|
2KB
|
139 lines
;------------------------------------------------------------------------------
; Patterns and rules to check for immediate win or prevent losing on next turn
;------------------------------------------------------------------------------
PATTERNS
abcd
a
b
c
d
a???
+b??
++c?
+++d
d???
+c??
++b?
+++a
ENDPATTERNS
RULES
a=*, b=X, c=X, d=X : a
a=X, b=*, c=X, d=X : b
a=*, b=O, c=O, d=O : a
a=O, b=*, c=O, d=O : b
ENDRULES
;------------------------------------------------------------------------------
; Eliminate columns which lead to an immediate loss
;------------------------------------------------------------------------------
PATTERNS
abOO
cd++
a???
cb??
?dO?
???O
ENDPATTERNS
RULES
a = O, d = * : d!
b = O, c = * : c!
ENDRULES
PATTERNS
O?-?
+O-?
++-?
++aO
ENDPATTERNS
RULES
a = * : a!
ENDRULES
PATTERNS
O??-
+O?-
++O-
+++-
+++a
ENDPATTERNS
RULES
a = * : a!
ENDRULES
;------------------------------------------------------------------------------
; Try to setup or prevent obvious two-way win situation
;------------------------------------------------------------------------------
PATTERNS
*abc*
*????
+a???
++b??
+++c?
++++*
*????
+c???
++b??
+++a?
++++*
ENDPATTERNS
RULES
a=*, b=X, c=X : a
a=X, b=*, c=X : b
a=*, b=O, c=O : a
a=O, b=*, c=O : b
ENDRULES
;------------------------------------------------------------------------------
; Last chance rule to prefer various columns
;------------------------------------------------------------------------------
PATTERNS
?bca???
ENDPATTERNS
RULES
a = * : a1
b = * : b2
c = * : c3
ENDRULES
ENDFILE